{extend name="common:base" /}
{block name="content"}
<div class="admin-content-body">
    <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">栏目管理</strong> / <small>栏目列表</small></div>
    </div>
    <hr>
    <div class="am-g">
        <div class="am-u-sm-12 am-u-md-6">
            <div class="am-btn-toolbar">
                <div class="am-btn-group am-btn-group-xs">
                    <a href="{:url('editcate',['id'=>0],null)}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</a>
                </div>
            </div>
        </div>
    </div>

    <div class="am-g">
        <div class="am-u-sm-12">
            <form class="am-form">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                        <tr class="am-text-center">
                            <th class="table-id">ID</th>
                            <th class="table-title">栏目名称</th>
                            <th class="table-type">显示状态</th>
                            <th class="table-author am-hide-sm-only">排序</th>
                            <th class="table-date am-hide-sm-only">创建时间</th>
                            <th class="table-set">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        {volist name="catelist" id="cl" empty="$empty"}
                        <tr>
                            <td>{$cl.id}</td>
                            <td><a href="#">{$cl.name}</a></td>
                            <td>{$cl.status}</td>
                            <td class="am-hide-sm-only">{$cl.sort}</td>
                            <td class="am-hide-sm-only">{$cl.create_time}</td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <a href="{:url('editcate',['id'=>$cl.id], null)}" class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</a>
                                        <a onclick='del_tr_data("{:url('delcate',['id'=>$cl.id])}")' class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        {/volist}
                    </tbody>
                </table>
                <div class="am-cf">共 {$catelist|count} 条记录</div>
                <hr />
                <p>注：.....</p>
            </form>
        </div>

    </div>
</div>
{/block}